package com.indusfo.spc.mapper;

import com.indusfo.spc.pojo.MatBadpheno;
import com.indusfo.spc.pojo.MatBom;
import com.indusfo.spc.pojo.MatFlow;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author liub
 * @Date 2019/11/21 8:38
 * @Version 1.0
 */

public interface MatBadphenoMapper {
    /**
     * 新增
     */
    int insertMatBadpheno(MatBadpheno matBadpheno);

    /**
     * 修改
     */
    int updateMatBadpheno(MatBadpheno matBadpheno);

    /**
     * 查询
     */
    List<MatBadpheno> queryMatBadpheno(MatBadpheno matBadpheno);

    /**
     * 条数
     */
    int countMatBadpheno(MatBadpheno matBadpheno);

    /**
     * 判重
     */
    int checkMatBadpheno(MatBadpheno matBadpheno);

    /**
     * 删除
     */
    int deleteMatBadpheno(@Param("matBadphenoIds") List<Integer> matBadphenoIds, @Param("dataState") Integer dataState);

    /**
     * 级联删除查询
     */
    List<MatBadpheno> queryMatBadphenoByMatFlowId(@Param("matFlowId") Integer matFlowId);

    /**
     * 级联删除
     */
    int deleteMatBadphenoByMatBadphenoId(@Param("matBadphenoId") Integer matBadphenoId, @Param("dataState") Integer dataState);

    List<MatBadpheno> queryMatBadphenoByMatFlowList(@Param("matFlowList")List<MatFlow> matFlowList);
}